package com.atmk.atmk.designMode.创建型.原型模式.demo3.浅拷贝;

import lombok.Data;

import java.util.List;


public class Person implements Cloneable {
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<String> getHobbies() {
        return hobbies;
    }

    public void setHobbies(List<String> hobbies) {
        this.hobbies = hobbies;
    }

    private String name;
    private List<String> hobbies;

    // Getters and setters

    @Override
    public Person clone() throws CloneNotSupportedException {
        return (Person) super.clone();
    }
}
